define(function() {
    return function() {
        function execute(context) {
            var elementName = context.element.nodeName.toLowerCase();
            if (elementName == "input" && "checkbox" == $(context.element).attr("type")) {
                //process display value for checkbox, only allow mini:value
                //display value "true" or "1" will be treated as checked
                var value = context.displayValue["mini:value"];
                if ("true" == value || "1" == value) {
                    $(context.element).attr("checked", "true");
                }
                else {
                    $(context.element).removeAttr("checked");
                }
            } else {
                //process display value for other tags
                for (var key in context.displayValue) {
                    if (key == "mini:value") {
                        $(context.element).val(context.displayValue[key]);
                    }
                    else if (key == "mini:text") {
                        $(context.element).text(context.displayValue[key]);
                    }
                }
            }
        }
        this.execute = execute;
        return this;
    }
});